package io;

import java.io.*;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("t01043eec7c54708f40.jpg");
        FileOutputStream fos = new FileOutputStream("t01043eec7c54708f40_cp.jpg");
        long start = System.currentTimeMillis();
        int d;
        while ((d = fis.read())!=-1){
            fos.write(d);
        }
        System.out.println("复制完毕");
        fis.close();
        fos.close();
        long end = System.currentTimeMillis();
        System.out.println("耗时："+(end-start)+"ms");
    }
}
